1. Field of the Invention
The present invention relates to a method, system and program for maintaining a copy relationship between primary volumes and corresponding secondary volumes.
2. Description of the Related Art
Data storage systems may maintain a secondary copy of data at a remote site to use in the event of a failure at the primary site. Such dual or shadow copies are typically made as the application system is writing new data to a primary storage device. International Business Machines Corporation (IBM®), the assignee of the subject patent application, provides two systems for maintaining remote copies of data at a secondary site, extended remote copy (XRC) and peer-to-peer remote copy (PPRC). These systems provide a method for recovering data updates between a last, safe backup and a system failure. Such data shadowing systems can also provide an additional remote copy for non-recovery purposes, such as local access at a remote site. These IBM XRC and PPRC systems are described in IBM publication “Remote Copy: Administrator's Guide and Reference,” IBM document no. SC35-0169-02 (IBM Copyright 1994, 1996), which publication is incorporated herein by reference in its entirety.
In such backup systems, data is maintained in volume pairs. A volume pair is comprised of a volume in a primary storage device and a corresponding volume in a secondary storage device that includes an identical copy of the data maintained in the primary volume. Typically, the primary volume of the pair will be maintained in a primary direct access storage device (DASD) and the secondary volume of the pair is maintained in a secondary DASD shadowing the data on the primary DASD. A primary storage controller may be provided to control access to the primary storage and a secondary storage controller may be provided to control access to the secondary storage.
In PPRC mirroring, when establishing a remote copy relationship between data sets in the primary volumes and secondary volumes, an initial copy of the primary volumes is written to the secondary volumes in the secondary DASD. Data sets from the primary volume are copied asynchronously during the initial copy, which means that the write acknowledgment is returned immediately to the host even before the data is physically copied to the secondary DASD over a dedicated cable or line. The initial copy operation sends the data sets in the PPRC relationship over the link in groups of data sets, referred to as establish chains.
In one mode of PPRC, any host writes to data sets in the primary volumes in the PPRC relationship while the initial copy operation is pending are intercepted. The initial copy logs the write operation and after completing the initial copy of a group of data sets, the logged writes are then transmitted over the line to the secondary site. If the initial copy operation has completed with respect to the data set of the intercepted write, then the data sets are copied synchronously to the corresponding secondary volume(s) in the secondary DASD, which means that acknowledgment of the write is not returned to the host initiating the write until the write completes at the secondary site, and acknowledgment is returned to the primary site to return to the host. Host operations may be delayed pending receipt of the synchronous acknowledgment.
The intercepted target data sets that are written synchronously to the secondary site have to share a link with the group of data being copied asynchronously, including both initial copy data and write requests that are handled asynchronously. This sharing of the link can cause further delays in processing the intercepted synchronous writes because the typically large size of asynchronous writes consumes a substantial amount of bandwidth, thereby causing delays in transmitting and processing the intercepted host writes being handled synchronously.
For these reasons, there is a need in the art to provide improved techniques for transferring data in primary volumes being mirrored at a remote site.